﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using DevComponents.DotNetBar;
using System.Windows.Forms;
using PlanningGIS.Util;
using System.Drawing;
using ESRI.ArcGIS.Controls;

namespace PlanningGIS.Engine.Controls
{
    /// <summary>
    /// 布局工具条控件
    /// </summary>
    public partial class CtlPageToolBar : ToolBar
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public CtlPageToolBar()
        {
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            InitializeComponent();
            AddItems();
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="container">控件容器</param>
        public CtlPageToolBar(IContainer container)
        {
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            container.Add(this);
            InitializeComponent();
            AddItems();
        }

        /// <summary>
        /// 添加工具按钮项
        /// </summary>
        private void AddItems()
        {
            List<ValueName> btns = new List<ValueName>()
            {
                new ValueName(){Value="ControlsSelectTool",Name="选择"},
                new ValueName(){Value="ControlsPageZoomInTool",Name="放大"},
                new ValueName(){Value="ControlsPageZoomOutTool",Name="缩小"},
                new ValueName(){Value="ControlsPagePanTool",Name="平移"},
                new ValueName(){Value="ControlsPageZoomInFixedCommand",Name="固定放大"},
                new ValueName(){Value="ControlsPageZoomOutFixedCommand",Name="固定缩小"},
                new ValueName(){Value="ControlsPageZoomWholePageCommand",Name="缩放至全页"},
                new ValueName(){Value="ControlsPageZoomWholePageCommand",Name="缩放至100%"},
                new ValueName(){Value="ControlsPageZoomPageWidthCommand",Name="缩放至页宽"},
                new ValueName(){Value="ControlsPageZoomPageToLastExtentBackCommand",Name="前一视图"},
                new ValueName(){Value="ControlsPageZoomPageToLastExtentForwardCommand",Name="后一视图"},
            };
            AddItems(btns);
        }

    }
}
